package com.scuthnweb.action.picwallmodule;

import javax.servlet.http.HttpSession;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.scuthnweb.service.PicwallModule;
import com.scuthnweb.tool.QueryValidateModule;

public class DeleteAlbumAction extends ActionSupport{
   private Integer uid;
   private Integer aid;
   private String sid;
   
   private PicwallModule picwallModule;
   private QueryValidateModule queryValidateModule;
   
   private String succ = "false";
   
   public String execute(){
/*		HttpSession session = ((HttpSession)ActionContext.getContext().get(ActionContext.SESSION));
		String sid = session.getId();*/
		if(!this.queryValidateModule.isSessionLogin(uid, sid))
			return ERROR;
		if(this.picwallModule.deleteAlbum(uid, aid)){
			this.succ = "true";
			return SUCCESS; 
		}else{
			return ERROR;
		}
   }
   
public PicwallModule getPicwallModule() {
	return picwallModule;
}

public void setPicwallModule(PicwallModule picwallModule) {
	
	this.picwallModule = picwallModule;
}

public Integer getAid() {
	return aid;
}

public void setAid(Integer aid) {
	this.aid = aid;
}

public QueryValidateModule getQueryValidateModule() {
	return queryValidateModule;
}

public void setQueryValidateModule(QueryValidateModule queryValidateModule) {
	this.queryValidateModule = queryValidateModule;
}

public String getSucc() {
	return succ;
}

public void setSucc(String succ) {
	this.succ = succ;
}

public String getSid() {
	return sid;
}

public void setSid(String sid) {
	this.sid = sid;
}

public Integer getUid() {
	return uid;
}

public void setUid(Integer uid) {
	this.uid = uid;
}
   
}
